﻿$(window).load(function(){
    $(".loading").fadeOut()
})

/****/
$(document).ready(function(){
    var whei=$(window).width()
    $("html").css({fontSize:whei/20})
    $(window).resize(function(){
        var whei=$(window).width()
        $("html").css({fontSize:whei/20})
    });
});

$(window).load(function(){$(".loading").fadeOut()})
$(function () {
    echarts_1()
    echarts_2()
    echarts_3()
    echarts_4()
    echarts_5()
    echarts_6()
    pe01()
    pe02()
    pe03()

    function echarts_1() {
        var myChart = echarts.init(document.getElementById('echarts1'));

        option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {type: 'shadow'},
            },"grid": {
                "top": "20%",
                "right":"50",
                "bottom":"20",
                "left":"30",
            },
            legend: {
                data: ['no_of_comments','rating','no_of_views'],//'字段1', '字段2', '字段3','字段4','字段5','字段6'
                right: 'center', width:'100%',
                textStyle: {
                    color: "#fff"
                },
                itemWidth: 12,
                itemHeight: 10,
            },



            "xAxis": [
                {
                    "type": "category",
                    data: ['1', '2', '3', '4','5', '6', '7', '8', '9', '10'],
                    axisLine: { lineStyle: {color: "rgba(255,255,255,.1)"}},
                    axisLabel:  { textStyle: {color: "rgba(255,255,255,.7)", fontSize: '14', },
                    },

                },
            ],
            "yAxis": [
                {
                    "type": "value",
                    "name": "单位次",
                    axisTick: {show: false},
                    splitLine: {
                        show: false,

                    },
                    "axisLabel": {
                        "show": true,
                        fontSize:14,
                        color: "rgba(255,255,255,.6)"

                    },
                    axisLine: {
                        min:0,
                        max:10,
                        lineStyle: {color: 'rgba(255,255,255,.1)'}
                    },//左线色

                }
                ,
                {
                    "type": "value",
                    "name": "",//增速
                    "show": true,
                    "axisLabel": {
                        "show": true,
                        fontSize:14,
                        formatter: "",//{value} %
                        color: "rgba(255,255,255,.6)"
                    },
                    axisTick: {show: false},
                    axisLine: {lineStyle: {color: 'rgba(255,255,255,.1)'}},//右线色
                    splitLine: {show:true,lineStyle: {color:'rgba(255,255,255,.1)'}},//x轴线
                },
            ],
            "series": [

                {
                    "name": "no_of_comments",
                    "type": "bar",
                    "data": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                    "barWidth": "15%",
                    "itemStyle": {
                        "normal": {
                            barBorderRadius: 15,
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 0,
                                color: '#8bd46e'
                            }, {
                                offset: 1,
                                color: '#09bcb7'
                            }]),
                        }
                    },
                    "barGap": "0.2"
                },
                {
                    "name": "rating",
                    "type": "bar",
                    "data":[5.0, 5.0, 4.0, 5.0, 5.0, 5.0, 4.75, 5.0, 5.0, 5.0],
                    "barWidth": "15%",
                    "itemStyle": {
                        "normal": {
                            barBorderRadius: 15,
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 0,
                                color: '#248ff7'
                            }, {
                                offset: 1,
                                color: '#6851f1'
                            }]),
                        }
                    },
                    "barGap": "0.2"
                },
                {
                    "name": "no_of_views",
                    "type": "bar",
                    "data":[172, 290, 281, 321, 338, 419, 488, 218, 84, 158],
                    "barWidth": "15%",
                    "itemStyle": {
                        "normal": {
                            barBorderRadius: 15,
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 0,
                                color: '#fccb05'
                            }, {
                                offset: 1,
                                color: '#f5804d'
                            }]),
                        }
                    },
                    "barGap": "0.2"
                },
                {
                    "name": "no_of_comments",
                    "type": "line",
                    smooth: true,
                    "yAxisIndex": 1,
                    "data": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
                    lineStyle: {
                        normal: {
                            width: 2
                        },
                    },
                    "itemStyle": {
                        "normal": {
                            "color": "#86d370",

                        }
                    },

                },

                {
                    "name": "rating",
                    "type": "line",
                    "yAxisIndex": 1,

                    "data": [5.0, 5.0, 4.0, 5.0, 5.0, 5.0, 4.75, 5.0, 5.0, 5.0],
                    lineStyle: {
                        normal: {
                            width: 2
                        },
                    },
                    "itemStyle": {
                        "normal": {
                            "color": "#3496f8",

                        }
                    },
                    "smooth": true
                } ,
                {
                    "name": "no_of_views",
                    "type": "line",
                    "yAxisIndex": 1,

                    "data":[172, 290, 281, 321, 338, 419, 488, 218, 84, 158],
                    lineStyle: {
                        normal: {
                            width: 2
                        },
                    },
                    "itemStyle": {
                        "normal": {
                            "color": "#fbc30d",

                        }
                    },
                    "smooth": true
                }
            ]
        };

        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });


    }
    function echarts_2() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('echarts2'));

        option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {type: 'shadow'},
                // formatter:'{c}' ,
            },
            grid: {
                left: '0',
                top: '30',
                right: '10',
                bottom: '-20',
                containLabel: true
            },
            legend: {
                data: ['acom', 'maxview','minrate'],
                right: 'center',
                top:0,
                textStyle: {
                    color: "#fff"
                },
                itemWidth: 12,
                itemHeight: 10,
                // itemGap: 35
            },

            xAxis: [{
                type: 'category',
                boundaryGap: false,
                axisLabel:  {
                    rotate: -90,
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize:14,

                    },
                },
                axisLine: {
                    lineStyle: {
                        color: 'rgba(255,255,255,.1)'
                    }

                },

                data: ['Autos & Vehicles','Comedy','Education','Entertainment','FiLm&Animation','Howto & Style','Music','News & Politics','Nonprofits&Activism','People&Blogs','Pets&Animals']

            }, {

                axisPointer: {show: false},
                axisLine: {  show: false},
                position: 'bottom',
                offset: 20,



            }],

            yAxis: [{
                type: 'value',
                axisTick: {show: false},
                // splitNumber: 6,
                axisLine: {
                    lineStyle: {
                        color: 'rgba(255,255,255,.1)'
                    }
                },
                axisLabel:  {
                    formatter: "{value} ",
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize:14,
                    },
                },

                splitLine: {
                    lineStyle: {
                        color: 'rgba(255,255,255,.1)'
                    }
                }
            }],
            series: [
                {
                    name: 'acom',
                    type: 'line',
                    smooth: true,
                    symbol: 'circle',
                    symbolSize: 5,
                    showSymbol: false,
                    lineStyle: {
                        normal: {
                            color: 'rgba(228, 228, 126, 1)',
                            width: 2
                        }
                    },
                    areaStyle: {
                        normal: {
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 0,
                                color: 'rgba(228, 228, 126, .2)'
                            }, {
                                offset: 1,
                                color: 'rgba(228, 228, 126, 0)'
                            }], false),
                            shadowColor: 'rgba(0, 0, 0, 0.1)',
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: 'rgba(228, 228, 126, 1)',
                            borderColor: 'rgba(228, 228, 126, .1)',
                            borderWidth: 12
                        }
                    },
                    data: [203.6,32.1,761.9,72.1,824.0,196.5,469.1,697.9,209.6,41.5,227.125]
                },
                {
                    name: 'maxview',
                    type: 'line',
                    smooth: true,
                    symbol: 'circle',
                    symbolSize: 5,
                    showSymbol: false,
                    lineStyle: {

                        normal: {
                            color: 'rgba(255, 128, 128, 1)',
                            width: 2
                        }
                    },
                    areaStyle: {
                        normal: {
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 0,
                                color: 'rgba(255, 128, 128,.2)'
                            }, {
                                offset:1,
                                color: 'rgba(255, 128, 128, 0)'
                            }], false),
                            shadowColor: 'rgba(0, 0, 0, 0.1)',
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: 'rgba(255, 128, 128, 1)',
                            borderColor: 'rgba(255, 128, 128, .1)',
                            borderWidth: 12
                        }
                    },
                    data: [300,545,616,354,595,484,423,610,337,602,809,576,277,323,536,301]
                },
                {
                    name: 'minrate',
                    type: 'line',
                    smooth: true,
                    symbol: 'circle',
                    symbolSize: 5,
                    showSymbol: false,
                    lineStyle: {
                        normal: {
                            color: 'black',
                            width: 2
                        }
                    },
                    areaStyle: {
                        normal: {
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 0,
                                color: 'blue',
                            }, {
                                offset: 1,
                                color: 'rgba(228, 228, 126, 0)'
                            }], false),
                            shadowColor: 'rgba(0, 0, 0, 0.1)',
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: 'rgba(228, 228, 126, 1)',
                            borderColor: 'rgba(228, 228, 126, .1)',
                            borderWidth: 12
                        }
                    },
                    data: [2,0,0,0,0,0,0,0,0,0,0]

                },
            ]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
    function echarts_3() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('echarts3'));
        // var category = [];
        //['UNA','Autos & Vehicles','Comedy','Education','Entertainment','Film & Animation','Howto & Style','Music','News & Politics','Nonprofits & Activism','People & Blogs','Pets & Animals','Science & Technology','Sports','Travel & Events']
        option = {

            tooltip: {
                trigger: 'axis',
                axisPointer: { // 坐标轴指示器，坐标轴触发有效
                    type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
                }
            },
            legend: {
                data: ['average_comments', 'max_views', 'min_rating'], //'average_comments', 'max_views', 'min_rating'
                right: 'left',//center
                top:0,
                textStyle: {
                    color: "#fff"
                },
                itemWidth: 12,
                itemHeight: 10,
                // itemGap: 35
            },
            grid: {
                left: '0',
                right: '20',
                bottom: '0',
                top:'10%',
                containLabel: true
            },
            xAxis: {
                type: 'category',
                data: [1,2,3,4,5,6,7,8,9,10],
                axisLine: {
                    lineStyle: {
                        color: 'white'

                    }
                },
                axisLabel: {
                    // rotate:-90,
                    // formatter:function(value){return value.split("").join("\n");},
                    textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize:12,
                    }
                },
                axisLine: {
                    lineStyle: {
                        color: 'rgba(255,255,255,0.3)'
                    }
                },
            },

            yAxis: {
                type: 'value',
                splitNumber: 4,
                axisTick: {show: false},
                splitLine: {
                    show: true,
                    lineStyle: {
                        color: 'rgba(255,255,255,0.1)'
                    }
                },
                axisLabel: {textStyle: {
                        color: "rgba(255,255,255,.6)",
                        fontSize:14,
                    }},
                axisLine: {show:false},
            },

            series: [{
                name: 'average_comments',
                type: 'bar',
                stack: 'a',
                barWidth: '30',barGap: 0,
                itemStyle: {
                    normal: {
                        color: '#8bd46e', }
                },
                data: [203, 32, 761, 72, 824, 196, 469, 697, 209, 41]
            },
                {
                    name: 'max_views',
                    type: 'bar',
                    stack: 'a',
                    barWidth: '30',barGap: 0,
                    itemStyle: {
                        normal: {
                            color: '#f5804d',
                            barBorderRadius:0, }
                    },
                    data: [158153, 40776, 211316, 30056, 159652, 341616, 181768, 337496, 67328, 5490]
                },
                {
                    name: 'min_rating',
                    type: 'bar',
                    stack: 'a',
                    barWidth: '30',barGap: 0,
                    itemStyle: {
                        normal: {
                            color: '#248ff7',
                            barBorderRadius:0, }
                    },
                    data: [ 273, 39, 952, 58, 725, 291, 424, 872, 197, 16]
                }
            ]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
    function echarts_5() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('echarts5'));

        option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {type: 'shadow'},
            },"grid": {
                "top": "15%",
                "right":"10%",
                "bottom":"20",
                "left":"10%",
            },
            legend: {
                data: ['字段1', '字段2'],
                right: 'center',
                top:0,
                textStyle: {
                    color: "#fff"
                },
                itemWidth: 12,
                itemHeight: 10,
            },
            "xAxis": [
                {
                    "type": "category",

                    data: ['2016', '2017', '2018', '2019'],
                    axisLine: { lineStyle: {color: "rgba(255,255,255,.1)"}},
                    axisLabel:  { textStyle: {color: "rgba(255,255,255,.7)", fontSize: '14', },
                    },

                },
            ],
            "yAxis": [
                {
                    "type": "value",
                    "name": "单位1",
                    splitLine: {show: false},
                    axisTick: {show: false},
                    "axisLabel": {
                        "show": true,
                        color: "rgba(255,255,255,.6)"

                    },
                    axisLine: {lineStyle: {color: 'rgba(255,255,255,.1)'}},//左线色

                },
                {
                    "type": "value",
                    "name": "单位2",
                    "show": true,
                    axisTick: {show: false},
                    "axisLabel": {
                        "show": true,
                        formatter: "{value} %",
                        color: "rgba(255,255,255,.6)"
                    },
                    axisLine: {lineStyle: {color: 'rgba(255,255,255,.1)'}},//右线色
                    splitLine: {show:true,lineStyle: {color:'rgba(255,255,255,.1)'}},//x轴线
                },
            ],
            "series": [

                {
                    "name": "字段1",
                    "type": "bar",
                    "data": [
                        18453.35 ,20572.22 ,24274.22 ,30500.00
                    ],
                    "barWidth": "20%",

                    "itemStyle": {
                        "normal": {
                            barBorderRadius: 15,
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 0,
                                color: '#fccb05'
                            }, {
                                offset: 1,
                                color: '#f5804d'
                            }]),
                        }
                    },
                    "barGap": "0"
                },
                {
                    "name": "字段2",
                    "type": "line",
                    "yAxisIndex": 1,

                    "data": [0,11.48,18.00,25.65],
                    lineStyle: {
                        normal: {
                            width: 2
                        },
                    },
                    "itemStyle": {
                        "normal": {
                            "color": "#ff3300",

                        }
                    },
                    "smooth": true
                }
            ]
        };
        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
    function echarts_4() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('echarts4'));
        var myColor=['#eb2100','#eb3600','#d0570e','#d0a00e','#34da62','#00e9db','#00c0e9','#0096f3'];
        // var category = JSON.parse(JSON.stringify({category}));
        // "${category}"
        // var snum = JSON.parse(JSON.stringify("${snum}"));
        var category = ['Nonprofits & Activism','Education','Autos & Vehicles','Travel & Events','UNA','Science & Technology','News & Politics','Howto & Style','People & Blogs','Sports'];
        var snum =[230604,1893547,3098991,4927910,5060911,5464894,21747248,24356959,24989076,25801014];

        // var avg=[];
        //
        // for(var i=0;i<snum.length;i++)
        // {
        //        sum += snum[i];
        // }
        // for(var i=0;i<snum.length;i++)
        // {
        //     avg[i] = snum[i]/sum;
        // }
        option = {

            grid: {
                left: '2%',
                top:'1%',
                right: '5%',
                bottom: '0%',
                containLabel: true
            },
            xAxis: [{
                show: false,
            }],
            yAxis: [{
                axisTick:'none',
                axisLine:'none',
                offset:'7',
                axisLabel: {
                    textStyle: {
                        color: 'rgba(255,255,255,.6)',
                        fontSize:'14',
                    }
                },
                data: category
                // ['Sports','People & Blogs','Howto & Style','News & Politics','Science & Technology','UNA','Travel & Events','Autos & Vehicles','Education','Nonprofits & Activism']
                // category
                // ['字段1','字段2','字段3','字段4','字段5','字段6','字段7','字段8','字段9']

            }, {
                axisTick:'none',
                axisLine:'none',
                axisLabel: {
                    textStyle: {
                        color: 'rgba(255,255,255,.6)',
                        fontSize:'14',
                    }
                },
                data: snum
                    //[25801014,24989076,24356959,21747248,5464894,5060911,4927910,3098991,1893547,230604] //161,871,154
                    // snum
                    // [1514, 1619, 1623,1968,2158,2456 ,3506,4664,8390]

            },{
                name:'单位：件',
                nameGap:'50',
                nameTextStyle:{
                    color: 'rgba(255,255,255,.6)',
                    fontSize:'16',
                },
                axisLine:{
                    lineStyle:{
                        color:'rgba(0,0,0,0)'
                    }
                },
                data: [],
            }],
            series: [{
                name: '条',
                type: 'bar',
                yAxisIndex: 0,
                data:  [0.2,1.61,2.64,4.19,4.30,4.65,18.5,20.72,21.25,21.95],
                //avg ,
                //[15.9,15.4,15.0,13.4,3.37,48,52,56,70],
                label:{
                    normal:{
                        show:true,
                        position:'right',
                        formatter:function(param){
                            return param.value + '%';
                        },
                        textStyle:{
                            color: 'rgba(255,255,255,.8)',
                            fontSize:'12',
                        }
                    }
                },
                barWidth: 15,
                itemStyle: {
                    normal: {
                        color: new echarts.graphic.LinearGradient(1, 0, 0, 0, [{
                            offset: 0,
                            color: '#03c893'
                        },
                            {
                                offset: 1,
                                color: '#0091ff'
                            }
                        ]),
                        barBorderRadius: 15,
                    }
                },
                z: 2
            }, {
                name: '白框',
                type: 'bar',
                yAxisIndex: 1,
                barGap: '-100%',
                data: [99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5,99.5],
                barWidth: 15,
                itemStyle: {
                    normal: {
                        color:'rgba(0,0,0,.2)',
                        barBorderRadius:15,
                    }
                },
                z: 1
            }]
        };


        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
    function echarts_6() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('echarts6'));


        option = {
            title:{
                text:'5132',
                subtext:'总体',
                x:'center',
                y:'40%',
                textStyle:{
                    color:'#fff',
                    fontSize:22,
                    lineHeight:10,
                },
                subtextStyle: {
                    color:'#90979c',
                    fontSize:16,
                    lineHeight:10,

                },
            },
            tooltip: {
                trigger: 'item',
                formatter: "{b} : {c} ({d}%)"
            },

            visualMap: {
                show: false,
                min: 500,
                max: 600,
                inRange: {
                    //colorLightness: [0, 1]
                }
            },
            series: [{
                name: '访问来源',
                type: 'pie',
                radius: ['50%', '70%'],
                center: ['50%', '50%'],
                color: ['rgb(131,249,103)', '#FBFE27', '#FE5050', '#1DB7E5'], //'#FBFE27','rgb(11,228,96)','#FE5050'
                data: [{
                    "value": 1924,
                    "name": "字段名称1"
                }, {
                    "value": 1055,
                    "name": "字段名称2"
                }, {
                    "value": 1532,
                    "name": "字段名称3"}
                ].sort(function(a, b) {
                    return a.value - b.value
                }),
                roseType: 'radius',

                label: {
                    normal: {
                        formatter: ['{c|{c}万}', '{b|{b}}'].join('\n'),
                        rich: {
                            c: {
                                color: 'rgb(241,246,104)',
                                fontSize: 20,
                                fontWeight:'bold',
                                lineHeight: 5
                            },
                            b: {
                                color: 'rgb(98,137,169)',
                                fontSize: 14,
                                height: 44
                            },
                        },
                    }
                },
                labelLine: {
                    normal: {
                        lineStyle: {
                            color: 'rgb(98,137,169)',
                        },
                        smooth: 0.2,
                        length: 10,
                        length2: 20,

                    }
                }
            }]
        };


        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }


    function pe01() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('pe01'));
        var txt=99
        option = {
            title: {
                text: txt+'%',
                x: 'center',
                y: 'center',
                textStyle: {
                    fontWeight: 'normal',
                    color: '#fff',
                    fontSize: '18'
                }
            },
            color:'rgba(255,255,255,.3)',

            series: [{
                name: 'Line 1',
                type: 'pie',
                clockWise: true,
                radius: ['65%', '80%'],
                itemStyle: {
                    normal: {
                        label: {
                            show: false
                        },
                        labelLine: {
                            show: false
                        }
                    }
                },
                hoverAnimation: false,
                data: [{
                    value: txt,
                    name: '已使用',
                    itemStyle: {
                        normal: {
                            color:'#eaff00',
                            label: {
                                show: false
                            },
                            labelLine: {
                                show: false
                            }
                        }
                    }
                }, {
                    name: '未使用',
                    value: 100-txt
                }]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }

    function pe02() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('pe02'));
        var txt=17
        option = {
            title: {
                text: txt+'%',
                x: 'center',
                y: 'center',
                textStyle: {
                    fontWeight: 'normal',
                    color: '#fff',
                    fontSize: '18'
                }
            },
            color:'rgba(255,255,255,.3)',

            series: [{
                name: 'Line 1',
                type: 'pie',
                clockWise: true,
                radius: ['65%', '80%'],
                itemStyle: {
                    normal: {
                        label: {
                            show: false
                        },
                        labelLine: {
                            show: false
                        }
                    }
                },
                hoverAnimation: false,
                data: [{
                    value: txt,
                    name: '已使用',
                    itemStyle: {
                        normal: {
                            color:'#ea4d4d',
                            label: {
                                show: false
                            },
                            labelLine: {
                                show: false
                            }
                        }
                    }
                }, {
                    name: '未使用',
                    value: 100-txt
                }]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
    function pe03() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('pe03'));
        var txt=2
        option = {
            title: {
                text: txt+'%',
                x: 'center',
                y: 'center',
                textStyle: {
                    fontWeight: 'normal',
                    color: '#fff',
                    fontSize: '18'
                }
            },
            color:'rgba(255,255,255,.3)',

            series: [{
                name: 'Line 1',
                type: 'pie',
                clockWise: true,
                radius: ['65%', '80%'],
                itemStyle: {
                    normal: {
                        label: {
                            show: false
                        },
                        labelLine: {
                            show: false
                        }
                    }
                },
                hoverAnimation: false,
                data: [{
                    value: txt,
                    name: '已使用',
                    itemStyle: {
                        normal: {
                            color:'#395ee6',
                            label: {
                                show: false
                            },
                            labelLine: {
                                show: false
                            }
                        }
                    }
                }, {
                    name: '未使用',
                    value: 100-txt
                }
                ]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
        window.addEventListener("resize",function(){
            myChart.resize();
        });
    }
})



		
		
		


		



















